// 加法action
export const createIncrementAction = data => ({type:'increment', data})

// 减法 action
export const createDecrementAction = data => ({type: 'decrement', data})

// 异步action 返回值为函数
export const createAsyncIncrementAction = (data, time=500) => {
    return (dispatch) => {
        setTimeout(() => {
            dispatch(createIncrementAction(data))
        }, time);
    }
}